﻿Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button_Calculate_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_result.Click
        Dim result As String
        result = Calculate_Result(tb_firstnum.Text, tb_secondnum.Text)
        lbl_result.Text = result
    End Sub

    Private Function Calculate_Result(ByVal firstnum_str As String, ByVal secondnum_str As String) As String
        Dim firstnum_int As Single
        Dim secondnum_int As Single
        Dim result_str As String
        Dim result_int As Single
        firstnum_int = CSng(firstnum_str)
        secondnum_int = CSng(secondnum_str)
        result_int = (firstnum_int + secondnum_int)
        result_str = CStr(result_int)

        Return result_str

    End Function
End Class